<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>height、min-height相关问题</title>
  <style>
    .parent1 {
      min-height: 200px;
    }

    .child1 {
      height: 100%;
      background: red;
    }

    .parent2 {
      min-height: 200px;
      height: 1px;
    }

    .child2 {
      height: 100%;
      background: red;
    }
  </style>
</head>

<body>
  <h2>父元素没有设置高度（height: 1px）的情况</h2>
  <div class="parent1">
    <div class="child1">123</div>
  </div>
  <h2>父元素设置高度（height: 1px）的情况</h2>
  <div class="parent2">
    <div class="child2">123</div>
  </div>

</body>

</html>
